package Demo02.Demo08;

import java.io.*;

public class Demo6 {
 
    public static void main(String[] args) throws IOException {
        InputStream in1 = new FileInputStream("E:\\KuGou\\白挺 - 伴你成长.mp3");
        InputStream in2 = new FileInputStream("E:\\KuGou\\小虎队 - 爱.mp3");
 
        SequenceInputStream sis = new SequenceInputStream(in1, in2);
        BufferedOutputStream bs = new BufferedOutputStream(new FileOutputStream("" +
                "E:\\KuGou\\爱伴你成长.mp3"));
 
        byte[] bys = new byte[1024];
        int len = 0;
        while ((len = sis.read(bys)) != -1) {
            bs.write(bys, 0, len);
        }
 
        bs.close();
        sis.close();
    }
 
}